#!/bin/sh

TAG_FILES=tag_files

rm -f cscope.*
rm -f tags

find net/ include/asm-generic/ include/net/ include/crypto/ include/net/ fs/ kernel/ include/linux/ mm/ -type f \( -name '*.h' -o -name '*.c' \) > $TAG_FILES

sed -e "/^net\/ipv6/d" $TAG_FILES > $TAG_FILES.bak
mv $TAG_FILES.bak $TAG_FILES

ctags -R -h ".h.c" --fields=+lS -L $TAG_FILES -I EXPORT_SYMBOL -I MODULE_VERSION -I MODULE_AUTHOR -I MODULE_DESCRIPTION -I MODULE_SUPPORTED_DEVICE -I MODULE_LICENSE -I MODULE_ALIAS_NETPROTO

cscope -bkq -i $TAG_FILES

